<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="baidu_union_verify" content="62af124fb74ca5ccb57f079f44216bc3">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理</title>
</head>

<link rel="stylesheet" type="text/css" href="../static/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../static/easyui/themes/default/easyui.css">
<script type="text/javascript" src="../static/js/jquery.js"></script>
<script type="text/javascript" src="../staticjs/jquery.min.js"></script>
<script type="text/javascript" src="../static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="../static/easyui/jquery.easyui.min.js"></script>

<link rel="stylesheet" type="text/css" href="../static/nav/nav.css">
<link rel="stylesheet" type="text/css" href="../static/nav/iconfont.css">
<script type="text/javascript" src="../static/nav/nav.js"></script>

<body class="easyui-layout">
	<div
		data-options="region:'north',title:'header',split:true,noheader:true"
		style="height: 10%; background: #666; overflow-y: hidden;">
		在线人数为：<%=com.guo.hui.shiro.SessionCounter.getSession()%>
		<div class="logout" style="text-align: right;">
			您好!|<a href="${pageContext.request.contextPath}/shang/logout">退出</a>
		</div>

	</div>
	<div
		data-options="region:'west',split:true,iconCls:'icon-world',title:'导航'"
		style="width: 250px; padding: 10px;">
		<div class="nav">
			<!-- <div class="nav-top">
				<div id="mini"
					style="border-bottom: 1px solid rgba(255, 255, 255, .1)">
					<img src="photo/mini.png">
				</div>
			</div> -->
			<ul>
				<li class="nav-item"><a href="javascript:;"><i
						class="my-icon nav-icon icon_1"></i><span>权限管理</span><i
						class="my-icon nav-more"></i></a>
					<ul>
						<shiro:hasPermission name="/blogadmin/user">
							<li onclick="save('user')"><a href="#"><span>用户管理</span></a></li>
						</shiro:hasPermission>
						<li onclick="save('role')"><a href="javascript:;"><span>角色管理</span></a></li>
						<li onclick="save('permission')"><a href="javascript:;"><span>权限管理</span></a></li>
					</ul></li>
				<li class="nav-item"><a href="javascript:;"><i
						class="my-icon nav-icon icon_2"></i><span>文章管理</span><i
						class="my-icon nav-more"></i></a>
					<ul>
						<li onclick="save('article')"><a href="javascript:;"><span>文章管理</span></a></li>
						<shiro:hasPermission name="/myline/index">
							<li onclick="save('myline')"><a href="javascript:;"><span>时光轴</span></a></li>
						</shiro:hasPermission>
					</ul></li>
				<li class="nav-item"><a href="javascript:;"><i
						class="my-icon nav-icon icon_3"></i><span>评论管理</span><i
						class="my-icon nav-more"></i></a>
					<ul>
						<li onclick="save('comment')"><a href="javascript:;"><span>评论管理</span></a></li>
					</ul></li>
				<li class="nav-item"><a href="javascript:;"><i
						class="my-icon nav-icon icon_3"></i><span>常用管理</span><i
						class="my-icon nav-more"></i></a>
					<ul>
						<li onclick="save('dict')"><a href="javascript:;"><span>字典管理</span></a></li>
						<li onclick="save('tool')"><a href="javascript:;"><span>工具管理</span></a></li>
						<li onclick="save('link')"><a href="javascript:;"><span>链接管理</span></a></li>
					</ul></li>
			</ul>
		</div>
	</div>

	<div id="main"
		data-options="region:'center',split:true,iconCls:'icon-world'">
	</div>

</body>


<script>
	function save(type) {

		var content;
		if ("article" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/blogarticle/article" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("user" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/blogadmin/user" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("userperson" == type) {
			var id = $("#userid").val();
			var url = '${pageContext.request.contextPath}/blogadmin/userperson?id='
					+ id;
			content = '<iframe src="'
					+ url
					+ '+" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("myline" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/myline/index" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("role" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/role/role" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("permission" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/permission/permission" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("dict" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/dict/index" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("tool" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/tool/index" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("comment" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/comment/index" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}
		if ("link" == type) {
			content = '<iframe src="${pageContext.request.contextPath}/link/index" scrolling="auto" frameborder="0" style="width: 100%; height: 100%;"></iframe>';
		}

		$("#main").html(content);

	}
</script>
</html>